package daoImpl;

import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

import dao.LoucengDao;
import entlty.Louceng;
import utils.BaseDao;

public class LoucengDaoImpl extends BaseDao implements LoucengDao{

	@Override
	public List<Louceng> getXinxi() {
		List<Louceng> list=new ArrayList<Louceng>();
		String sql="select * from louceng";
		ResultSet rs=super.exeQuery(sql);
		try {
			while(rs.next()){
				Louceng l=new Louceng(rs.getInt(1),rs.getString(2));
				list.add(l);
			}
		} catch (Exception e) {
			// TODO: handle exception
		}
		return list;
	}

}
